package com.rybbaby.tss.platform.sysAdminUser.entity;

import com.rybbaby.tss.platform.sysSchool.entity.SysSchool;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;

/**
 * @description 管理员基本信息
 * 
 * @author 谢进伟
 * 
 * @createDate 2016-11-22 下午1:36:42
 */
@Entity
@Table(name = "sys_admin_user")
@DynamicUpdate(true)
@DynamicInsert(true)
public class SysAdminUser implements Serializable {
	
	private static final long serialVersionUID = 18306515711802L;

	/** 主键 **/
	private String id;
	/** 用户名 **/
	private String userName;
	/** 身份证号 **/
	private String idCardNum;
	/** 入职时间 **/
	private Date entryTime;
	/** 密码 **/
	private String userPassword;
	/** 真实名称 **/
	private String realName;
	/** 兼任职务**/
	private  String partTime;
	/** 职位 **/
	private String post;
	/** 工号 **/
	private String jobNumber;
	/** 性别 **/
	private Integer sex;
	/** 邮箱 **/
	private String email;
	/** 微信 **/
	private String wechat;
	/** QQ **/
	private String qq;
	/** 手机号 **/
	private String phoneNumber;
	/** 座机号 **/
	private String festnetznummer;
	/** 头像 **/
	private String headPortrait;
	/** 是否可删除 **/
	private Boolean isCanDelete;
	/** 创建时间 **/
	private java.sql.Timestamp createTime;
	/** 最后修改时间 **/
	private java.sql.Timestamp lastUpdateTime;
	/** 创建人 **/
	private String createUser;
	/** 在线时的sessionId **/
	private String onlineSessionId;
	/** 是否禁用 **/
	private Boolean isForbidden;
	/** 是否在线 **/
	private Integer isOnline;
	/** 版本 **/
	private Integer version;
	/** 课程编码 **/
	private String sourceCode;
	/** 课程id **/
	private String sourceId;
	/**  园所id **/
	private String schoolId;
	/** 角色分组id **/
	private String  roleGroupId;

	/**籍贯 **/
	private String nativePlace;

	/** 出生日期 **/
	private Date birthdayDate ;

	/** 民族 **/
	private  Integer  nation;

	/** 学历 **/
	private  Integer educationBackground;

	/** 是否开通账号 **/
	private Boolean isOpenAccount;

	/** 员工编码 **/
	private String adminUserCode;

	/** 用户信息 **/
	private SysAdminUser sysAdminUser;

	/** 园所信息 **/
	private SysSchool sysSchool;




	/**
	 * 方法: 取得主键
	 *
	 * @return java.lang.String 主键
	 */
	@Id
	@GeneratedValue(generator = "sys_admin_userIDGenerator" , strategy = GenerationType.AUTO)
	@GenericGenerator(name = "sys_admin_userIDGenerator" , strategy = "uuid")
	@Column(name = "id" , nullable = false , length = 32)
	public String getId() {
		return this.id;
	}
	
	/**
	 * 方法: 设置主键
	 *
	 * @param id
	 *            主键
	 */
	public void setId(String id) {
		this.id = id;
	}
	
	/**
	 * 方法: 取得用户名
	 *
	 * @return java.lang.String 用户名
	 */
	@Column(name = "userName" , nullable = true , length = 12)
	public String getUserName() {
		return this.userName;
	}
	
	/**
	 * 方法: 设置用户名
	 *
	 * @param userName
	 *            用户名
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	/**
	 * 方法: 取得密码
	 *
	 * @return java.lang.String 密码
	 */
	@Column(name = "userPassword" , nullable = true , length = 16)
	public String getUserPassword() {
		return this.userPassword;
	}
	
	/**
	 * 方法: 设置密码
	 *
	 * @param userPassword
	 *            密码
	 */
	public void setUserPassword(String userPassword) {
		this.userPassword = userPassword;
	}
	
	/**
	 * 方法: 取得真实名称
	 *
	 * @return java.lang.String 真实名称
	 */
	@Column(name = "realName" , nullable = true , length = 12)
	public String getRealName() {
		return this.realName;
	}
	
	/**
	 * 方法: 设置真实名称
	 *
	 * @param realName
	 *            真实名称
	 */
	public void setRealName(String realName) {
		this.realName = realName;
	}
	
	/**
	 * 方法: 取得邮箱
	 *
	 * @return java.lang.String 邮箱
	 */
	@Column(name = "email" , nullable = true , length = 50)
	public String getEmail() {
		return this.email;
	}

	/**
	 * 方法: 设置邮箱
	 *
	 * @param email
	 *            邮箱
	 */
	public void setEmail(String email) {
		this.email = email;
	}
	/**
	 * 方法: 取得职位
	 *
	 * @return java.lang.String 职位
	 */
	@Column(name = "post" , nullable = true , length = 50)
	public String getPost() {
		return post;
	}
	/**
	 * 方法: 设置职位
	 *
	 * @param post
	 *            职位
	 */
	public void setPost(String post) {
		this.post = post;
	}
	/**
	 * 方法: 取得工号
	 *
	 * @return java.lang.String 工号
	 */
	@Column(name = "jobnumber" , nullable = true , length = 15)
	public String getJobNumber() {
		return jobNumber;
	}
	/**
	 * 方法: 设置工号
	 *
	 * @param jobNumber
	 *            工号
	 */
	public void setJobNumber(String jobNumber) {
		this.jobNumber = jobNumber;
	}
	/**
	 * 方法: 取得性别
	 *
	 * @return java.lang.Integer 性别
	 */
	@Column(name = "sex" , nullable = true , length = 11)
	public Integer getSex() {
		return sex;
	}
	/**
	 * 方法: 设置性别
	 *
	 * @param sex
	 *            性别
	 */
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	/**
	 * 方法: 取得微信
	 *
	 * @return java.lang.String 微信
	 */
	@Column(name = "wechat" , nullable = true , length = 20)
	public String getWechat() {
		return this.wechat;
	}
	
	/**
	 * 方法: 设置微信
	 *
	 * @param wechat
	 *            微信
	 */
	public void setWechat(String wechat) {
		this.wechat = wechat;
	}
	
	/**
	 * 方法: 取得QQ
	 *
	 * @return java.lang.String QQ
	 */
	@Column(name = "qq" , nullable = true , length = 15)
	public String getQq() {
		return this.qq;
	}
	
	/**
	 * 方法: 设置QQ
	 *
	 * @param qq
	 *            QQ
	 */
	public void setQq(String qq) {
		this.qq = qq;
	}
	
	/**
	 * 方法: 取得手机号
	 *
	 * @return java.lang.String 手机号
	 */
	@Column(name = "phoneNumber" , nullable = true , length = 11)
	public String getPhoneNumber() {
		return this.phoneNumber;
	}
	
	/**
	 * 方法: 设置手机号
	 *
	 * @param phoneNumber
	 *            手机号
	 */
	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
	
	/**
	 * 方法: 取得座机号
	 *
	 * @return java.lang.String 座机号
	 */
	@Column(name = "festnetznummer" , nullable = true , length = 12)
	public String getFestnetznummer() {
		return this.festnetznummer;
	}
	
	/**
	 * 方法: 设置座机号
	 *
	 * @param festnetznummer
	 *            座机号
	 */
	public void setFestnetznummer(String festnetznummer) {
		this.festnetznummer = festnetznummer;
	}
	
	/**
	 * 方法: 取得头像
	 *
	 * @return java.lang.String 头像
	 */
	@Column(name = "headPortrait" , nullable = true , length = 1000)
	public String getHeadPortrait() {
		return this.headPortrait;
	}
	
	/**
	 * 方法: 设置头像
	 *
	 * @param headPortrait
	 *            头像
	 */
	public void setHeadPortrait(String headPortrait) {
		this.headPortrait = headPortrait;
	}
	
	/**
	 * 方法: 取得是否可删除
	 *
	 * @return java.lang.Boolean 是否可删除
	 */
	@Column(name = "isCanDelete" , nullable = true , length = 1)
	public Boolean getIsCanDelete() {
		return this.isCanDelete;
	}
	
	/**
	 * 方法: 设置是否可删除
	 *
	 * @param isCanDelete
	 *            是否可删除
	 */
	public void setIsCanDelete(Boolean isCanDelete) {
		this.isCanDelete = isCanDelete;
	}
	
	/**
	 * 方法: 取得创建时间
	 *
	 * @return java.sql.Timestamp 创建时间
	 */
	@Column(name = "createTime" , nullable = true , length = 19)
	public java.sql.Timestamp getCreateTime() {
		return this.createTime;
	}
	
	/**
	 * 方法: 设置创建时间
	 *
	 * @param createTime
	 *            创建时间
	 */
	public void setCreateTime(java.sql.Timestamp createTime) {
		this.createTime = createTime;
	}
	
	/**
	 * 方法: 取得最后修改时间
	 *
	 * @return java.sql.Timestamp 最后修改时间
	 */
	@Column(name = "lastUpdateTime" , nullable = true , length = 19)
	public java.sql.Timestamp getLastUpdateTime() {
		return this.lastUpdateTime;
	}
	
	/**
	 * 方法: 设置最后修改时间
	 *
	 * @param lastUpdateTime
	 *            最后修改时间
	 */
	public void setLastUpdateTime(java.sql.Timestamp lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}
	
	/**
	 * 方法: 取得创建人
	 *
	 * @return java.lang.String 创建人
	 */
	@Column(name = "createUser" , nullable = true , length = 32)
	public String getCreateUser() {
		return this.createUser;
	}
	
	/**
	 * 方法: 设置创建人
	 *
	 * @param createUser
	 *            创建人
	 */
	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}
	
	/**
	 * 方法: 取得是否禁用
	 *
	 * @return java.lang.Boolean 是否禁用
	 */
	@Column(name = "isForbidden" , nullable = true , length = 1)
	public Boolean getIsForbidden() {
		return this.isForbidden;
	}
	
	/**
	 * 方法: 设置是否禁用
	 *
	 * @param isForbidden
	 *            是否禁用
	 */
	public void setIsForbidden(Boolean isForbidden) {
		this.isForbidden = isForbidden;
	}
	
	/**
	 * 方法: 取得在线时的sessionId
	 *
	 * @return java.lang.onlineSessionId 在线时的sessionId
	 */
	@Column(name = "onlineSessionId" , nullable = true , length = 64)
	public String getOnlineSessionId() {
		return onlineSessionId;
	}
	
	/**
	 * 方法: 设置在线时的sessionId
	 *
	 * @param onlineSessionId
	 *            在线时的sessionId
	 */
	public void setOnlineSessionId(String onlineSessionId) {
		this.onlineSessionId = onlineSessionId;
	}
	
	/**
	 * 方法: 取得是否在线
	 *
	 * @return java.lang.Integer 是否在线
	 */
	@Column(name = "isOnline" , nullable = true , length = 11)
	public Integer getIsOnline() {
		return isOnline;
	}
	
	/**
	 * 方法: 设置是否在线
	 *
	 * @param
	 * isOnline      是否在线
	 */
	public void setIsOnline(Integer isOnline) {
		this.isOnline = isOnline;
	}
	
	/**
	 * 方法: 取得版本
	 *
	 * @return java.lang.Integer 版本
	 */
	@Version
	@Column(name = "version" , nullable = true , length = 11)
	public Integer getVersion() {
		return this.version;
	}
	
	/**
	 * 方法: 设置版本
	 *
	 * @param version
	 *            版本
	 */
	public void setVersion(Integer version) {
		this.version = version;
	}
	@Column(name = "sourceCode" , nullable = true , length = 32)
	public String getSourceCode() {
		return sourceCode;
	}

	public void setSourceCode(String sourceCode) {
		this.sourceCode = sourceCode;
	}
	@Column(name = "sourceId" , nullable = true , length = 32)
	public String getSourceId() {
		return sourceId;
	}

	public void setSourceId(String sourceId) {
		this.sourceId = sourceId;
	}
	@Column(name = "schoolId" , nullable = true , length = 32)
	public String getSchoolId() {
		return schoolId;
	}

	public void setSchoolId(String schoolId) {
		this.schoolId = schoolId;
	}
	@Column(name = "roleGroupId" , nullable = true , length = 32)
	public String getRoleGroupId() {
		return roleGroupId;
	}

	public void setRoleGroupId(String roleGroupId) {
		this.roleGroupId = roleGroupId;
	}

    @Column(name = "partTime" , nullable = true , length = 50)
    public String getPartTime() {
        return partTime;
    }

    public void setPartTime(String partTime) {
        this.partTime = partTime;
    }

	@Column(name = "nativePlace" , nullable = true , length = 20)
	public String getNativePlace() {
		return nativePlace;
	}

	public void setNativePlace(String nativePlace) {
		this.nativePlace = nativePlace;
	}
	@Column(name = "birthdayDate" , nullable = true , length = 10)
	public Date getBirthdayDate() {
		return birthdayDate;
	}

	public void setBirthdayDate(Date birthdayDate) {
		this.birthdayDate = birthdayDate;
	}
	@Column(name = "nation" , nullable = true , length = 11)
	public Integer getNation() {
		return nation;
	}

	public void setNation(Integer nation) {
		this.nation = nation;
	}
	@Column(name = "educationBackground" , nullable = true , length = 11)
	public Integer getEducationBackground() {
		return educationBackground;
	}

	public void setEducationBackground(Integer educationBackground) {
		this.educationBackground = educationBackground;
	}
	@Column(name = "isOpenAccount" , nullable = true , length = 1)
	public Boolean getIsOpenAccount() {
		return isOpenAccount;
	}

	public void setIsOpenAccount(Boolean isOpenAccount) {
		this.isOpenAccount = isOpenAccount;
	}
	@Column(name = "idCardNum" , nullable = true , length = 20)
	public String getIdCardNum() {
		return idCardNum;
	}

	public void setIdCardNum(String idCardNum) {
		this.idCardNum = idCardNum;
	}

	@Column(name = "entryTime" , nullable = true )
	public Date getEntryTime() {
		return entryTime;
	}

	public void setEntryTime(Date entryTime) {
		this.entryTime = entryTime;
	}

	@JoinColumn(name = "createUser", insertable = false, updatable = false)
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = SysAdminUser.class)
	public SysAdminUser getSysAdminUser() {
		return sysAdminUser;
	}

	public void setSysAdminUser(SysAdminUser sysAdminUser) {
		this.sysAdminUser = sysAdminUser;
	}
	@JoinColumn(name = "schoolId", insertable = false, updatable = false)
	@ManyToOne(fetch = FetchType.LAZY, targetEntity = SysSchool.class)
	public SysSchool getSysSchool() {
		return sysSchool;
	}

	public void setSysSchool(SysSchool sysSchool) {
		this.sysSchool = sysSchool;
	}

	@Column(name = "adminUserCode" , nullable = true , length = 32)
	public String getAdminUserCode() {
		return adminUserCode;
	}

	public void setAdminUserCode(String adminUserCode) {
		this.adminUserCode = adminUserCode;
	}
}